home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / info / xemacs.info-16.z / xemacs.info-16
Encoding:
GNU Info File  |  1998-05-21  |  49.6 KB  |  1,280 lines

  1. This is Info file ../../info/xemacs.info, produced by Makeinfo version
  2. 1.68 from the input file xemacs.texi.
  3.  
  4.    This file documents the XEmacs editor.
  5.  
  6.    Copyright (C) 1985, 1986, 1988 Richard M. Stallman.  Copyright (C)
  7. 1991, 1992, 1993, 1994 Lucid, Inc.  Copyright (C) 1993, 1994 Sun
  8. Microsystems, Inc.  Copyright (C) 1995 Amdahl Corporation.
  9.  
  10.    Permission is granted to make and distribute verbatim copies of this
  11. manual provided the copyright notice and this permission notice are
  12. preserved on all copies.
  13.  
  14.    Permission is granted to copy and distribute modified versions of
  15. this manual under the conditions for verbatim copying, provided also
  16. that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
  17. General Public License" are included exactly as in the original, and
  18. provided that the entire resulting derived work is distributed under the
  19. terms of a permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that the sections entitled "The GNU Manifesto",
  24. "Distribution" and "GNU General Public License" may be included in a
  25. translation approved by the author instead of in the original English.
  26.  
  27. 
  28. File: xemacs.info,  Node: Syntax Entry,  Next: Syntax Change,  Up: Syntax
  29.  
  30. Information About Each Character
  31. --------------------------------
  32.  
  33.    The syntax table entry for a character is a number that encodes six
  34. pieces of information:
  35.  
  36.    * The syntactic class of the character, represented as a small
  37.      integer
  38.  
  39.    * The matching delimiter, for delimiter characters only (the
  40.      matching delimiter of `(' is `)', and vice versa)
  41.  
  42.    * A flag saying whether the character is the first character of a
  43.      two-character comment starting sequence
  44.  
  45.    * A flag saying whether the character is the second character of a
  46.      two-character comment starting sequence
  47.  
  48.    * A flag saying whether the character is the first character of a
  49.      two-character comment ending sequence
  50.  
  51.    * A flag saying whether the character is the second character of a
  52.      two-character comment ending sequence
  53.  
  54.    The syntactic classes are stored internally as small integers, but
  55. are usually described to or by the user with characters.  For example,
  56. `(' is used to specify the syntactic class of opening delimiters.  Here
  57. is a table of syntactic classes, with the characters that specify them.
  58.  
  59. ` '
  60.      The class of whitespace characters.
  61.  
  62. `w'
  63.      The class of word-constituent characters.
  64.  
  65. `_'
  66.      The class of characters that are part of symbol names but not
  67.      words.  This class is represented by `_' because the character `_'
  68.      has this class in both C and Lisp.
  69.  
  70. `.'
  71.      The class of punctuation characters that do not fit into any other
  72.      special class.
  73.  
  74. `('
  75.      The class of opening delimiters.
  76.  
  77. `)'
  78.      The class of closing delimiters.
  79.  
  80. `''
  81.      The class of expression-adhering characters.  These characters are
  82.      part of a symbol if found within or adjacent to one, and are part
  83.      of a following expression if immediately preceding one, but are
  84.      like whitespace if surrounded by whitespace.
  85.  
  86. `"'
  87.      The class of string-quote characters.  They match each other in
  88.      pairs, and the characters within the pair all lose their syntactic
  89.      significance except for the `\' and `/' classes of escape
  90.      characters, which can be used to include a string-quote inside the
  91.      string.
  92.  
  93. `$'
  94.      The class of self-matching delimiters.  This is intended for TeX's
  95.      `$', which is used both to enter and leave math mode.  Thus, a
  96.      pair of matching `$' characters surround each piece of math mode
  97.      TeX input.  A pair of adjacent `$' characters act like a single
  98.      one for purposes of matching.
  99.  
  100. `/'
  101.      The class of escape characters that always just deny the following
  102.      character its special syntactic significance.  The character after
  103.      one of these escapes is always treated as alphabetic.
  104.  
  105. `\'
  106.      The class of C-style escape characters.  In practice, these are
  107.      treated just like `/'-class characters, because the extra
  108.      possibilities for C escapes (such as being followed by digits)
  109.      have no effect on where the containing expression ends.
  110.  
  111. `<'
  112.      The class of comment-starting characters.  Only single-character
  113.      comment starters (such as `;' in Lisp mode) are represented this
  114.      way.
  115.  
  116. `>'
  117.      The class of comment-ending characters.  Newline has this syntax in
  118.      Lisp mode.
  119.  
  120.    The characters flagged as part of two-character comment delimiters
  121. can have other syntactic functions most of the time.  For example, `/'
  122. and `*' in C code, when found separately, have nothing to do with
  123. comments.  The comment-delimiter significance overrides when the pair of
  124. characters occur together in the proper order.  Only the list and sexp
  125. commands use the syntax table to find comments; the commands
  126. specifically for comments have other variables that tell them where to
  127. find comments.  Moreover, the list and sexp commands notice comments
  128. only if `parse-sexp-ignore-comments' is non-`nil'.  This variable is set
  129. to `nil' in modes where comment-terminator sequences are liable to
  130. appear where there is no comment, for example, in Lisp mode where the
  131. comment terminator is a newline but not every newline ends a comment.
  132.  
  133. 
  134. File: xemacs.info,  Node: Syntax Change,  Prev: Syntax Entry,  Up: Syntax
  135.  
  136. Altering Syntax Information
  137. ---------------------------
  138.  
  139.    It is possible to alter a character's syntax table entry by storing
  140. a new number in the appropriate element of the syntax table, but it
  141. would be hard to determine what number to use.  Emacs therefore
  142. provides a command that allows you to specify the syntactic properties
  143. of a character in a convenient way.
  144.  
  145.    `M-x modify-syntax-entry' is the command to change a character's
  146. syntax.  It can be used interactively and is also used by major modes
  147. to initialize their own syntax tables.  Its first argument is the
  148. character to change.  The second argument is a string that specifies the
  149. new syntax.  When called from Lisp code, there is a third, optional
  150. argument, which specifies the syntax table in which to make the change.
  151. If not supplied, or if this command is called interactively, the third
  152. argument defaults to the current buffer's syntax table.
  153.  
  154.   1. The first character in the string specifies the syntactic class.
  155.      It is one of the characters in the previous table (*note Syntax
  156.      Entry::.).
  157.  
  158.   2. The second character is the matching delimiter.  For a character
  159.      that is not an opening or closing delimiter, this should be a
  160.      space, and may be omitted if no following characters are needed.
  161.  
  162.   3. The remaining characters are flags.  The flag characters allowed
  163.      are:
  164.  
  165.     `1'
  166.           Flag this character as the first of a two-character comment
  167.           starting sequence.
  168.  
  169.     `2'
  170.           Flag this character as the second of a two-character comment
  171.           starting sequence.
  172.  
  173.     `3'
  174.           Flag this character as the first of a two-character comment
  175.           ending sequence.
  176.  
  177.     `4'
  178.           Flag this character as the second of a two-character comment
  179.           ending sequence.
  180.  
  181.    Use `C-h s' (`describe-syntax') to display a description of the
  182. contents of the current syntax table.  The description of each
  183. character includes both the string you have to pass to
  184. `modify-syntax-entry' to set up that character's current syntax, and
  185. some English to explain that string if necessary.
  186.  
  187. 
  188. File: xemacs.info,  Node: Init File,  Next: Audible Bell,  Prev: Syntax,  Up: Customization
  189.  
  190. The Init File, .emacs
  191. =====================
  192.  
  193.    When you start Emacs, it normally loads the file `.emacs' in your
  194. home directory.  This file, if it exists, should contain Lisp code.  It
  195. is called your initialization file or "init file".  Use the command
  196. line switches `-q' and `-u' to tell Emacs whether to load an init file
  197. (*note Entering Emacs::.).
  198.  
  199.    When the `.emacs' file is read, the variable `init-file-user' says
  200. which user's init file it is.  The value may be the null string or a
  201. string containing a user's name.  If the value is a null string, it
  202. means that the init file was taken from the user that originally logged
  203. in.
  204.  
  205.    In all cases, `(concat "~" init-file-user "/")' evaluates to the
  206. directory name of the directory where the `.emacs' file was looked for.
  207.  
  208.    At some sites there is a "default init file", which is the library
  209. named `default.el', found via the standard search path for libraries.
  210. The Emacs distribution contains no such library; your site may create
  211. one for local customizations.  If this library exists, it is loaded
  212. whenever you start Emacs.  But your init file, if any, is loaded first;
  213. if it sets `inhibit-default-init' non-`nil', then `default' is not
  214. loaded.
  215.  
  216.    If you have a large amount of code in your `.emacs' file, you should
  217. move it into another file named `SOMETHING.el', byte-compile it (*note
  218. Lisp Libraries::.), and load that file from your `.emacs' file using
  219. `load'.
  220.  
  221. * Menu:
  222.  
  223. * Init Syntax::     Syntax of constants in Emacs Lisp.
  224. * Init Examples::   How to do some things with an init file.
  225. * Terminal Init::   Each terminal type can have an init file.
  226.  
  227. 
  228. File: xemacs.info,  Node: Init Syntax,  Next: Init Examples,  Up: Init File
  229.  
  230. Init File Syntax
  231. ----------------
  232.  
  233.    The `.emacs' file contains one or more Lisp function call
  234. expressions.  Each consists of a function name followed by arguments,
  235. all surrounded by parentheses.  For example, `(setq fill-column 60)'
  236. represents a call to the function `setq' which is used to set the
  237. variable `fill-column' (*note Filling::.) to 60.
  238.  
  239.    The second argument to `setq' is an expression for the new value of
  240. the variable.  This can be a constant, a variable, or a function call
  241. expression.  In `.emacs', constants are used most of the time.  They
  242. can be:
  243.  
  244. Numbers
  245.      Integers are written in decimal, with an optional initial minus
  246.      sign.
  247.  
  248.      If a sequence of digits is followed by a period and another
  249.      sequence of digits, it is interpreted as a floating point number.
  250.  
  251. Strings
  252.      Lisp string syntax is the same as C string syntax with a few extra
  253.      features.  Use a double-quote character to begin and end a string
  254.      constant.
  255.  
  256.      Newlines and special characters may be present literally in
  257.      strings.  They can also be represented as backslash sequences:
  258.      `\n' for newline, `\b' for backspace, `\r' for return, `\t' for
  259.      tab, `\f' for formfeed (control-l), `\e' for escape, `\\' for a
  260.      backslash, `\"' for a double-quote, or `\OOO' for the character
  261.      whose octal code is OOO.  Backslash and double-quote are the only
  262.      characters for which backslash sequences are mandatory.
  263.  
  264.      You can use `\C-' as a prefix for a control character, as in
  265.      `\C-s' for ASCII Control-S, and `\M-' as a prefix for a Meta
  266.      character, as in `\M-a' for Meta-A or `\M-\C-a' for Control-Meta-A.
  267.  
  268. Characters
  269.      Lisp character constant syntax consists of a `?' followed by
  270.      either a character or an escape sequence starting with `\'.
  271.      Examples: `?x', `?\n', `?\"', `?\)'.  Note that strings and
  272.      characters are not interchangeable in Lisp; some contexts require
  273.      one and some contexts require the other.
  274.  
  275. True
  276.      `t' stands for `true'.
  277.  
  278. False
  279.      `nil' stands for `false'.
  280.  
  281. Other Lisp objects
  282.      Write a single-quote (') followed by the Lisp object you want.
  283.  
  284. 
  285. File: xemacs.info,  Node: Init Examples,  Next: Terminal Init,  Prev: Init Syntax,  Up: Init File
  286.  
  287. Init File Examples
  288. ------------------
  289.  
  290.    Here are some examples of doing certain commonly desired things with
  291. Lisp expressions:
  292.  
  293.    * Make <TAB> in C mode just insert a tab if point is in the middle
  294.      of a line.
  295.  
  296.           (setq c-tab-always-indent nil)
  297.  
  298.      Here we have a variable whose value is normally `t' for `true' and
  299.      the alternative is `nil' for `false'.
  300.  
  301.    * Make searches case sensitive by default (in all buffers that do not
  302.      override this).
  303.  
  304.           (setq-default case-fold-search nil)
  305.  
  306.      This sets the default value, which is effective in all buffers
  307.      that do not have local values for the variable.  Setting
  308.      `case-fold-search' with `setq' affects only the current buffer's
  309.      local value, which is probably not what you want to do in an init
  310.      file.
  311.  
  312.    * Make Text mode the default mode for new buffers.
  313.  
  314.           (setq default-major-mode 'text-mode)
  315.  
  316.      Note that `text-mode' is used because it is the command for
  317.      entering the mode we want.  A single-quote is written before it to
  318.      make a symbol constant; otherwise, `text-mode' would be treated as
  319.      a variable name.
  320.  
  321.    * Turn on Auto Fill mode automatically in Text mode and related
  322.      modes.
  323.  
  324.           (setq text-mode-hook
  325.             '(lambda () (auto-fill-mode 1)))
  326.  
  327.      Here we have a variable whose value should be a Lisp function.  The
  328.      function we supply is a list starting with `lambda', and a single
  329.      quote is written in front of it to make it (for the purpose of this
  330.      `setq') a list constant rather than an expression.  Lisp functions
  331.      are not explained here; for mode hooks it is enough to know that
  332.      `(auto-fill-mode 1)' is an expression that will be executed when
  333.      Text mode is entered.  You could replace it with any other
  334.      expression that you like, or with several expressions in a row.
  335.  
  336.           (setq text-mode-hook 'turn-on-auto-fill)
  337.  
  338.      This is another way to accomplish the same result.
  339.      `turn-on-auto-fill' is a symbol whose function definition is
  340.      `(lambda () (auto-fill-mode 1))'.
  341.  
  342.    * Load the installed Lisp library named `foo' (actually a file
  343.      `foo.elc' or `foo.el' in a standard Emacs directory).
  344.  
  345.           (load "foo")
  346.  
  347.      When the argument to `load' is a relative pathname, not starting
  348.      with `/' or `~', `load' searches the directories in `load-path'
  349.      (*note Loading::.).
  350.  
  351.    * Load the compiled Lisp file `foo.elc' from your home directory.
  352.  
  353.           (load "~/foo.elc")
  354.  
  355.      Here an absolute file name is used, so no searching is done.
  356.  
  357.    * Rebind the key `C-x l' to run the function `make-symbolic-link'.
  358.  
  359.           (global-set-key "\C-xl" 'make-symbolic-link)
  360.  
  361.      or
  362.  
  363.           (define-key global-map "\C-xl" 'make-symbolic-link)
  364.  
  365.      Note once again the single-quote used to refer to the symbol
  366.      `make-symbolic-link' instead of its value as a variable.
  367.  
  368.    * Do the same thing for C mode only.
  369.  
  370.           (define-key c-mode-map "\C-xl" 'make-symbolic-link)
  371.  
  372.    * Bind the function key <F1> to a command in C mode.  Note that the
  373.      names of function keys must be lower case.
  374.  
  375.           (define-key c-mode-map 'f1 'make-symbolic-link)
  376.  
  377.    * Bind the shifted version of <F1> to a command.
  378.  
  379.           (define-key c-mode-map '(shift f1) 'make-symbolic-link)
  380.  
  381.    * Redefine all keys which now run `next-line' in Fundamental mode to
  382.      run `forward-line' instead.
  383.  
  384.           (substitute-key-definition 'next-line 'forward-line
  385.                                      global-map)
  386.  
  387.    * Make `C-x C-v' undefined.
  388.  
  389.           (global-unset-key "\C-x\C-v")
  390.  
  391.      One reason to undefine a key is so that you can make it a prefix.
  392.      Simply defining `C-x C-v ANYTHING' would make `C-x C-v' a prefix,
  393.      but `C-x C-v' must be freed of any non-prefix definition first.
  394.  
  395.    * Make `$' have the syntax of punctuation in Text mode.  Note the
  396.      use of a character constant for `$'.
  397.  
  398.           (modify-syntax-entry ?\$ "." text-mode-syntax-table)
  399.  
  400.    * Enable the use of the command `eval-expression' without
  401.      confirmation.
  402.  
  403.           (put 'eval-expression 'disabled nil)
  404.  
  405. 
  406. File: xemacs.info,  Node: Terminal Init,  Prev: Init Examples,  Up: Init File
  407.  
  408. Terminal-Specific Initialization
  409. --------------------------------
  410.  
  411.    Each terminal type can have a Lisp library to be loaded into Emacs
  412. when it is run on that type of terminal.  For a terminal type named
  413. TERMTYPE, the library is called `term/TERMTYPE' and it is found by
  414. searching the directories `load-path' as usual and trying the suffixes
  415. `.elc' and `.el'.  Normally it appears in the subdirectory `term' of
  416. the directory where most Emacs libraries are kept.
  417.  
  418.    The usual purpose of the terminal-specific library is to define the
  419. escape sequences used by the terminal's function keys using the library
  420. `keypad.el'.  See the file `term/vt100.el' for an example of how this
  421. is done.
  422.  
  423.    When the terminal type contains a hyphen, only the part of the name
  424. before the first hyphen is significant in choosing the library name.
  425. Thus, terminal types `aaa-48' and `aaa-30-rv' both use the library
  426. `term/aaa'.  The code in the library can use `(getenv "TERM")' to find
  427. the full terminal type name.
  428.  
  429.    The library's name is constructed by concatenating the value of the
  430. variable `term-file-prefix' and the terminal type.  Your `.emacs' file
  431. can prevent the loading of the terminal-specific library by setting
  432. `term-file-prefix' to `nil'.
  433.  
  434.    The value of the variable `term-setup-hook', if not `nil', is called
  435. as a function of no arguments at the end of Emacs initialization, after
  436. both your `.emacs' file and any terminal-specific library have been
  437. read.  You can set the value in the `.emacs' file to override part of
  438. any of the terminal-specific libraries and to define initializations
  439. for terminals that do not have a library.
  440.  
  441. 
  442. File: xemacs.info,  Node: Audible Bell,  Next: Faces,  Prev: Init File,  Up: Customization
  443.  
  444. Changing the Bell Sound
  445. =======================
  446.  
  447.    You can now change how the audible bell sounds using the variable
  448. `sound-alist'.
  449.  
  450.    `sound-alist''s value is an list associating symbols with, among
  451. other things, strings of audio-data.  When `ding' is called with one of
  452. the symbols, the associated sound data is played instead of the
  453. standard beep.  This only works if you are logged in on the console of a
  454. machine with audio hardware. To listen to a sound of the provided type,
  455. call the function `play-sound' with the argument SOUND. You can also
  456. set the volume of the sound with the optional argument VOLUME.
  457.  
  458.    Each element of `sound-alist' is a list describing a sound.  The
  459. first element of the list is the name of the sound being defined.
  460. Subsequent elements of the list are alternating keyword/value pairs:
  461.  
  462. `sound'
  463.      A string of raw sound data, or the name of another sound to play.
  464.      The symbol `t' here means use the default X beep.
  465.  
  466. `volume'
  467.      An integer from 0-100, defaulting to `bell-volume'.
  468.  
  469. `pitch'
  470.      If using the default X beep, the pitch (Hz) to generate.
  471.  
  472. `duration'
  473.      If using the default X beep, the duration (milliseconds).
  474.  
  475.    For compatibility, elements of `sound-alist' may also be of the form:
  476.  
  477.      ( SOUND-NAME . <SOUND> )
  478.      ( SOUND-NAME <VOLUME> <SOUND> )
  479.  
  480.    You should probably add things to this list by calling the function
  481. `load-sound-file'.
  482.  
  483.    Note that you can only play audio data if running on the console
  484. screen of a machine with audio hardware which emacs understands, which
  485. at this time means a Sun SparcStation, SGI, or HP9000s700.
  486.  
  487.    Also note that the pitch, duration, and volume options are available
  488. everywhere, but most X servers ignore the `pitch' option.
  489.  
  490.    The variable `bell-volume' should be an integer from 0 to 100, with
  491. 100 being loudest, which controls how loud the sounds emacs makes
  492. should be.  Elements of the `sound-alist' may override this value.
  493. This variable applies to the standard X bell sound as well as sound
  494. files.
  495.  
  496.    If the symbol `t' is in place of a sound-string, Emacs uses the
  497. default X beep.  This allows you to define beep-types of different
  498. volumes even when not running on the console.
  499.  
  500.    You can add things to this list by calling the function
  501. `load-sound-file', which reads in an audio-file and adds its data to
  502. the sound-alist. You can specify the sound with the SOUND-NAME argument
  503. and the file into which the sounds are loaded with the FILENAME
  504. argument. The optional VOLUME argument sets the volume.
  505.  
  506.    `load-sound-file (FILENAME SOUND-NAME &optional VOLUME)'
  507.  
  508.    To load and install some sound files as beep-types, use the function
  509. `load-default-sounds' (note that this only works if you are on display
  510. 0 of a machine with audio hardware).
  511.  
  512.    The following beep-types are used by Emacs itself. Other Lisp
  513. packages may use other beep types, but these are the ones that the C
  514. kernel of Emacs uses.
  515.  
  516. `auto-save-error'
  517.      An auto-save does not succeed
  518.  
  519. `command-error'
  520.      The Emacs command loop catches an error
  521.  
  522. `undefined-key'
  523.      You type a key that is undefined
  524.  
  525. `undefined-click'
  526.      You use an undefined mouse-click combination
  527.  
  528. `no-completion'
  529.      Completion was not possible
  530.  
  531. `y-or-n-p'
  532.      You type something other than the required `y' or `n'
  533.  
  534. `yes-or-no-p'
  535.      You type something other than `yes' or `no'
  536.  
  537. 
  538. File: xemacs.info,  Node: Faces,  Next: X Resources,  Prev: Audible Bell,  Up: Customization
  539.  
  540. Faces
  541. =====
  542.  
  543.    XEmacs has objects called extents and faces.  An "extent" is a
  544. region of text and a "face" is a collection of textual attributes, such
  545. as fonts and colors.  Every extent is displayed in some face;
  546. therefore, changing the properties of a face immediately updates the
  547. display of all associated extents.  Faces can be frame-local: you can
  548. have a region of text that displays with completely different
  549. attributes when its buffer is viewed from a different X window.
  550.  
  551.    The display attributes of faces may be specified either in Lisp or
  552. through the X resource manager.
  553.  
  554. Customizing Faces
  555. -----------------
  556.  
  557.    You can change the face of an extent with the functions in this
  558. section.  All the functions prompt for a FACE as an argument; use
  559. completion for a list of possible values.
  560.  
  561. `M-x invert-face'
  562.      Swap the foreground and background colors of the given FACE.
  563.  
  564. `M-x make-face-bold'
  565.      Make the font of the given FACE bold.  When called from a program,
  566.      returns `nil' if this is not possible.
  567.  
  568. `M-x make-face-bold-italic'
  569.      Make the font of the given FACE bold italic.  When called from a
  570.      program, returns `nil' if not possible.
  571.  
  572. `M-x make-face-italic'
  573.      Make the font of the given FACE italic.  When called from a
  574.      program, returns `nil' if not possible.
  575.  
  576. `M-x make-face-unbold'
  577.      Make the font of the given FACE non-bold.  When called from a
  578.      program, returns `nil' if not possible.
  579.  
  580. `M-x make-face-unitalic'
  581.      Make the font of the given FACE non-italic.  When called from a
  582.      program, returns `nil' if not possible.
  583.  
  584. `M-x make-face-larger'
  585.      Make the font of the given FACE a little larger.  When called from
  586.      a program, returns `nil' if not possible.
  587.  
  588. `M-x make-face-smaller'
  589.      Make the font of the given FACE a little smaller.  When called
  590.      from a program, returns `nil' if not possible.
  591.  
  592. `M-x set-face-background'
  593.      Change the background color of the given FACE.
  594.  
  595. `M-x set-face-background-pixmap'
  596.      Change the background pixmap of the given FACE.
  597.  
  598. `M-x set-face-font'
  599.      Change the font of the given FACE.
  600.  
  601. `M-x set-face-foreground'
  602.      Change the foreground color of the given FACE.
  603.  
  604. `M-x set-face-underline-p'
  605.      Change whether the given FACE is underlined.
  606.  
  607.    You can exchange the foreground and background color of the selected
  608. FACE with the function `invert-face'. If the face does not specify both
  609. foreground and background, then its foreground and background are set
  610. to the background and foreground of the default face.  When calling
  611. this from a program, you can supply the optional argument FRAME to
  612. specify which frame is affected; otherwise, all frames are affected.
  613.  
  614.    You can set the background color of the specified FACE with the
  615. function `set-face-background'.  The argument `color' should be a
  616. string, the name of a color.  When called from a program, if the
  617. optional FRAME argument is provided, the face is changed only in that
  618. frame; otherwise, it is changed in all frames.
  619.  
  620.    You can set the background pixmap of the specified FACE with the
  621. function `set-face-background-pixmap'.  The pixmap argument NAME should
  622. be a string, the name of a file of pixmap data.  The directories listed
  623. in the `x-bitmap-file-path' variable are searched.  The bitmap may also
  624. be a list of the form `(WIDTH HEIGHT DATA)', where WIDTH and HEIGHT are
  625. the size in pixels, and DATA is a string containing the raw bits of the
  626. bitmap.  If the optional FRAME argument is provided, the face is
  627. changed only in that frame; otherwise, it is changed in all frames.
  628.  
  629.    The variable `x-bitmap-file-path' takes as a value a list of the
  630. directories in which X bitmap files may be found.  If the value is
  631. `nil', the list is initialized from the `*bitmapFilePath' resource.
  632.  
  633.    If the environment variable XBMLANGPATH is set, then it is consulted
  634. before the `x-bitmap-file-path' variable.
  635.  
  636.    You can set the font of the specified FACE with the function
  637. `set-face-font'.  The FONT argument should be a string, the name of a
  638. font.  When called from a program, if the optional FRAME argument is
  639. provided, the face is changed only in that frame; otherwise, it is
  640. changed in all frames.
  641.  
  642.    You can set the foreground color of the specified FACE with the
  643. function `set-face-foreground'.  The argument COLOR should be a string,
  644. the name of a color.  If the optional FRAME argument is provided, the
  645. face is changed only in that frame; otherwise, it is changed in all
  646. frames.
  647.  
  648.    You can set underline the specified FACE with the function
  649. `set-face-underline-p'. The argument UNDERLINE-P can be used to make
  650. underlining an attribute of the face or not. If the optional FRAME
  651. argument is provided, the face is changed only in that frame;
  652. otherwise, it is changed in all frames.
  653.  
  654. 
  655. File: xemacs.info,  Node: X Resources,  Prev: Faces,  Up: Customization
  656.  
  657. X Resources
  658. ===========
  659.  
  660.    The Emacs resources are generally set per-frame. Each Emacs frame
  661. can have its own name or the same name as another, depending on the
  662. name passed to the `make-frame' function.
  663.  
  664.    You can specify resources for all frames with the syntax:
  665.  
  666.      Emacs*parameter: value
  667.  
  668. or
  669.  
  670.      Emacs*EmacsFrame.parameter:value
  671.  
  672. You can specify resources for a particular frame with the syntax:
  673.  
  674.      Emacs*FRAME-NAME.parameter: value
  675.  
  676. * Menu:
  677.  
  678. * Geometry Resources::     Controlling the size and position of frames.
  679. * Iconic Resources::       Controlling whether frames come up iconic.
  680. * Resource List::       List of resources settable on a frame or device.
  681. * Face Resources::       Controlling faces using resources.
  682. * Widgets::           The widget hierarchy for XEmacs.
  683. * Menubar Resources::       Specifying resources for the menubar.
  684.  
  685. 
  686. File: xemacs.info,  Node: Geometry Resources,  Next: Iconic Resources,  Up: X Resources
  687.  
  688. Geometry Resources
  689. ------------------
  690.  
  691.    To make the default size of all Emacs frames be 80 columns by 55
  692. lines, do this:
  693.  
  694.      Emacs*EmacsFrame.geometry: 80x55
  695.  
  696. To set the geometry of a particular frame named `fred', do this:
  697.  
  698.      Emacs*fred.geometry: 80x55
  699.  
  700. Important! Do not use the following syntax:
  701.  
  702.      Emacs*geometry: 80x55
  703.  
  704. You should never use `*geometry' with any X application. It does not
  705. say "make the geometry of Emacs be 80 columns by 55 lines."  It really
  706. says, "make Emacs and all subwindows thereof be 80x55 in whatever units
  707. they care to measure in."  In particular, that is both telling the
  708. Emacs text pane to be 80x55 in characters, and telling the menubar pane
  709. to be 80x55 pixels, which is surely not what you want.
  710.  
  711.    As a special case, this geometry specification also works (and sets
  712. the default size of all Emacs frames to 80 columns by 55 lines):
  713.  
  714.      Emacs.geometry: 80x55
  715.  
  716. since that is the syntax used with most other applications (since most
  717. other applications have only one top-level window, unlike Emacs).  In
  718. general, however, the top-level shell (the unmapped ApplicationShell
  719. widget named `Emacs' that is the parent of the shell widgets that
  720. actually manage the individual frames) does not have any interesting
  721. resources on it, and you should set the resources on the frames instead.
  722.  
  723.    The `-geometry' command-line argument sets only the geometry of the
  724. initial frame created by Emacs.
  725.  
  726.    A more complete explanation of geometry-handling is
  727.  
  728.    * The `-geometry' command-line option sets the `Emacs.geometry'
  729.      resource, that is, the geometry of the ApplicationShell.
  730.  
  731.    * For the first frame created, the size of the frame is taken from
  732.      the ApplicationShell if it is specified, otherwise from the
  733.      geometry of the frame.
  734.  
  735.    * For subsequent frames, the order is reversed: First the frame, and
  736.      then the ApplicationShell.
  737.  
  738.    * For the first frame created, the position of the frame is taken
  739.      from the ApplicationShell (`Emacs.geometry') if it is specified,
  740.      otherwise from the geometry of the frame.
  741.  
  742.    * For subsequent frames, the position is taken only from the frame,
  743.      and never from the ApplicationShell.
  744.  
  745.    This is rather complicated, but it does seem to provide the most
  746. intuitive behavior with respect to the default sizes and positions of
  747. frames created in various ways.
  748.  
  749. 
  750. File: xemacs.info,  Node: Iconic Resources,  Next: Resource List,  Prev: Geometry Resources,  Up: X Resources
  751.  
  752. Iconic Resources
  753. ----------------
  754.  
  755.    Analogous to `-geometry', the `-iconic' command-line option sets the
  756. iconic flag of the ApplicationShell (`Emacs.iconic') and always applies
  757. to the first frame created regardless of its name.  However, it is
  758. possible to set the iconic flag on particular frames (by name) by using
  759. the `Emacs*FRAME-NAME.iconic' resource.
  760.  
  761. 
  762. File: xemacs.info,  Node: Resource List,  Next: Face Resources,  Prev: Iconic Resources,  Up: X Resources
  763.  
  764. Resource List
  765. -------------
  766.  
  767.    Emacs frames accept the following resources:
  768.  
  769. `geometry' (class `Geometry'): string
  770.      Initial geometry for the frame.  *Note Geometry Resources:: for a
  771.      complete discussion of how this works.
  772.  
  773. `iconic' (class `Iconic'): boolean
  774.      Whether this frame should appear in the iconified state.
  775.  
  776. `internalBorderWidth' (class `InternalBorderWidth'): int
  777.      How many blank pixels to leave between the text and the edge of the
  778.      window.
  779.  
  780. `interline' (class `Interline'): int
  781.      How many pixels to leave between each line (may not be
  782.      implemented).
  783.  
  784. `menubar' (class `Menubar'): boolean
  785.      Whether newly-created frames should initially have a menubar.  Set
  786.      to true by default.
  787.  
  788. `initiallyUnmapped' (class `InitiallyUnmapped'): boolean
  789.      Whether XEmacs should leave the initial frame unmapped when it
  790.      starts up.  This is useful if you are starting XEmacs as a server
  791.      (e.g. in conjunction with gnuserv or the external client widget).
  792.      You can also control this with the `-unmapped' command-line option.
  793.  
  794. `barCursor' (class `BarColor'): boolean
  795.      Whether the cursor should be displayed as a bar, or the
  796.      traditional box.
  797.  
  798. `cursorColor' (class `CursorColor'): color-name
  799.      The color of the text cursor.
  800.  
  801. `scrollBarWidth' (class `ScrollBarWidth'): integer
  802.      How wide the vertical scrollbars should be, in pixels; 0 means no
  803.      vertical scrollbars.  You can also use a resource specification of
  804.      the form `*scrollbar.width', or the usual toolkit scrollbar
  805.      resources: `*XmScrollBar.width' (Motif), `*XlwScrollBar.width'
  806.      (Lucid), or `*Scrollbar.thickness' (Athena).  We don't recommend
  807.      that you use the toolkit resources, though, because they're
  808.      dependent on how exactly your particular build of XEmacs was
  809.      configured.
  810.  
  811. `scrollBarHeight' (class `ScrollBarHeight'): integer
  812.      How high the horizontal scrollbars should be, in pixels; 0 means no
  813.      horizontal scrollbars.  You can also use a resource specification
  814.      of the form `*scrollbar.height', or the usual toolkit scrollbar
  815.      resources: `*XmScrollBar.height' (Motif), `*XlwScrollBar.height'
  816.      (Lucid), or `*Scrollbar.thickness' (Athena).  We don't recommend
  817.      that you use the toolkit resources, though, because they're
  818.      dependent on how exactly your particular build of XEmacs was
  819.      configured.
  820.  
  821. `scrollBarPlacement' (class `ScrollBarPlacement'): string
  822.      Where the horizontal and vertical scrollbars should be positioned.
  823.      This should be one of the four strings `BOTTOM_LEFT',
  824.      `BOTTOM_RIGHT', `TOP_LEFT', and `TOP_RIGHT'.  Default is
  825.      `BOTTOM_RIGHT' for the Motif and Lucid scrollbars and
  826.      `BOTTOM_LEFT' for the Athena scrollbars.
  827.  
  828. `topToolBarHeight' (class `TopToolBarHeight'): integer
  829. `bottomToolBarHeight' (class `BottomToolBarHeight'): integer
  830. `leftToolBarWidth' (class `LeftToolBarWidth'): integer
  831. `rightToolBarWidth' (class `RightToolBarWidth'): integer
  832.      Height and width of the four possible toolbars.
  833.  
  834. `topToolBarShadowColor' (class `TopToolBarShadowColor'): color-name
  835. `bottomToolBarShadowColor' (class `BottomToolBarShadowColor'): color-name
  836.      Color of the top and bottom shadows for the toolbars.  NOTE: These
  837.      resources do *not* have anything to do with the top and bottom
  838.      toolbars (i.e. the toolbars at the top and bottom of the frame)!
  839.      Rather, they affect the top and bottom shadows around the edges of
  840.      all four kinds of toolbars.
  841.  
  842. `topToolBarShadowPixmap' (class `TopToolBarShadowPixmap'): pixmap-name
  843. `bottomToolBarShadowPixmap' (class `BottomToolBarShadowPixmap'): pixmap-name
  844.      Pixmap of the top and bottom shadows for the toolbars.  If set,
  845.      these resources override the corresponding color resources. NOTE:
  846.      These resources do *not* have anything to do with the top and
  847.      bottom toolbars (i.e. the toolbars at the top and bottom of the
  848.      frame)!  Rather, they affect the top and bottom shadows around the
  849.      edges of all four kinds of toolbars.
  850.  
  851. `toolBarShadowThickness' (class `ToolBarShadowThickness'): integer
  852.      Thickness of the shadows around the toolbars, in pixels.
  853.  
  854. `visualBell' (class `VisualBell'): boolean
  855.      Whether XEmacs should flash the screen rather than making an
  856.      audible beep.
  857.  
  858. `bellVolume' (class `BellVolume'): integer
  859.      Volume of the audible beep.
  860.  
  861. `useBackingStore' (class `UseBackingStore'): boolean
  862.      Whether XEmacs should set the backing-store attribute of the X
  863.      windows it creates.  This increases the memory usage of the X
  864.      server but decreases the amount of X traffic necessary to update
  865.      the screen, and is useful when the connection to the X server goes
  866.      over a low-bandwidth line such as a modem connection.
  867.  
  868.    Emacs devices accept the following resources:
  869.  
  870. `textPointer' (class `Cursor'): cursor-name
  871.      The cursor to use when the mouse is over text.  This resource is
  872.      used to initialize the variable `x-pointer-shape'.
  873.  
  874. `selectionPointer' (class `Cursor'): cursor-name
  875.      The cursor to use when the mouse is over a selectable text region
  876.      (an extent with the `highlight' property; for example, an Info
  877.      cross-reference).  This resource is used to initialize the variable
  878.      `x-selection-pointer-shape'.
  879.  
  880. `spacePointer' (class `Cursor'): cursor-name
  881.      The cursor to use when the mouse is over a blank space in a buffer
  882.      (that is, after the end of a line or after the end-of-file).  This
  883.      resource is used to initialize the variable
  884.      `x-nontext-pointer-shape'.
  885.  
  886. `modeLinePointer' (class `Cursor'): cursor-name
  887.      The cursor to use when the mouse is over a modeline.  This
  888.      resource is used to initialize the variable `x-mode-pointer-shape'.
  889.  
  890. `gcPointer' (class `Cursor'): cursor-name
  891.      The cursor to display when a garbage-collection is in progress.
  892.      This resource is used to initialize the variable
  893.      `x-gc-pointer-shape'.
  894.  
  895. `scrollbarPointer' (class `Cursor'): cursor-name
  896.      The cursor to use when the mouse is over the scrollbar.  This
  897.      resource is used to initialize the variable
  898.      `x-scrollbar-pointer-shape'.
  899.  
  900. `pointerColor' (class `Foreground'): color-name
  901. `pointerBackground' (class `Background'): color-name
  902.      The foreground and background colors of the mouse cursor.  These
  903.      resources are used to initialize the variables
  904.      `x-pointer-foreground-color' and `x-pointer-background-color'.
  905.  
  906. 
  907. File: xemacs.info,  Node: Face Resources,  Next: Widgets,  Prev: Resource List,  Up: X Resources
  908.  
  909. Face Resources
  910. --------------
  911.  
  912.    The attributes of faces are also per-frame. They can be specified as:
  913.  
  914.      Emacs.FACE_NAME.parameter: value
  915.  
  916. or
  917.  
  918.      Emacs*FRAME_NAME.FACE_NAME.parameter: value
  919.  
  920. Faces accept the following resources:
  921.  
  922. `attributeFont' (class `AttributeFont'): font-name
  923.      The font of this face.
  924.  
  925. `attributeForeground' (class `AttributeForeground'): color-name
  926. `attributeBackground' (class `AttributeBackground'): color-name
  927.      The foreground and background colors of this face.
  928.  
  929. `attributeBackgroundPixmap' (class `AttributeBackgroundPixmap'): file-name
  930.      The name of an XBM file (or XPM file, if your version of Emacs
  931.      supports XPM), to use as a background stipple.
  932.  
  933. `attributeUnderline' (class `AttributeUnderline'): boolean
  934.      Whether text in this face should be underlined.
  935.  
  936.    All text is displayed in some face, defaulting to the face named
  937. `default'.  To set the font of normal text, use
  938. `Emacs*default.attributeFont'. To set it in the frame named `fred', use
  939. `Emacs*fred.default.attributeFont'.
  940.  
  941.    These are the names of the predefined faces:
  942.  
  943. `default'
  944.      Everything inherits from this.
  945.  
  946. `bold'
  947.      If this is not specified in the resource database, Emacs tries to
  948.      find a bold version of the font of the default face.
  949.  
  950. `italic'
  951.      If this is not specified in the resource database, Emacs tries to
  952.      find an italic version of the font of the default face.
  953.  
  954. `bold-italic'
  955.      If this is not specified in the resource database, Emacs tries to
  956.      find a bold-italic version of the font of the default face.
  957.  
  958. `modeline'
  959.      This is the face that the modeline is displayed in.  If not
  960.      specified in the resource database, it is determined from the
  961.      default face by reversing the foreground and background colors.
  962.  
  963. `highlight'
  964.      This is the face that highlighted extents (for example, Info
  965.      cross-references and possible completions, when the mouse passes
  966.      over them) are displayed in.
  967.  
  968. `left-margin'
  969. `right-margin'
  970.      These are the faces that the left and right annotation margins are
  971.      displayed in.
  972.  
  973. `zmacs-region'
  974.      This is the face that mouse selections are displayed in.
  975.  
  976. `isearch'
  977.      This is the face that the matched text being searched for is
  978.      displayed in.
  979.  
  980. `info-node'
  981.      This is the face of info menu items.  If unspecified, it is copied
  982.      from `bold-italic'.
  983.  
  984. `info-xref'
  985.      This is the face of info cross-references.  If unspecified, it is
  986.      copied from `bold'. (Note that, when the mouse passes over a
  987.      cross-reference, the cross-reference's face is determined from a
  988.      combination of the `info-xref' and `highlight' faces.)
  989.  
  990.    Other packages might define their own faces; to see a list of all
  991. faces, use any of the interactive face-manipulation commands such as
  992. `set-face-font' and type `?' when you are prompted for the name of a
  993. face.
  994.  
  995.    If the `bold', `italic', and `bold-italic' faces are not specified
  996. in the resource database, then XEmacs attempts to derive them from the
  997. font of the default face.  It can only succeed at this if you have
  998. specified the default font using the XLFD (X Logical Font Description)
  999. format, which looks like
  1000.  
  1001.      *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
  1002.  
  1003. If you use any of the other, less strict font name formats, some of
  1004. which look like
  1005.  
  1006.      lucidasanstypewriter-12
  1007.      fixed
  1008.      9x13
  1009.  
  1010.    then XEmacs won't be able to guess the names of the bold and italic
  1011. versions.  All X fonts can be referred to via XLFD-style names, so you
  1012. should use those forms.  See the man pages for `X(1)', `xlsfonts(1)',
  1013. and `xfontsel(1)'.
  1014.  
  1015. 
  1016. File: xemacs.info,  Node: Widgets,  Next: Menubar Resources,  Prev: Face Resources,  Up: X Resources
  1017.  
  1018. Widgets
  1019. -------
  1020.  
  1021.    There are several structural widgets between the terminal EmacsFrame
  1022. widget and the top level ApplicationShell; the exact names and types of
  1023. these widgets change from release to release (for example, they changed
  1024. between 19.8 and 19.9, 19.9 and 19.10, and 19.10 and 19.12) and are
  1025. subject to further change in the future, so you should avoid mentioning
  1026. them in your resource database.  The above-mentioned syntaxes should be
  1027. forward- compatible.  As of 19.13, the exact widget hierarchy is as
  1028. follows:
  1029.  
  1030.      INVOCATION-NAME            "shell"       "container"     FRAME-NAME
  1031.      x-emacs-application-class  "EmacsShell"  "EmacsManager"  "EmacsFrame"
  1032.  
  1033.    where INVOCATION-NAME is the terminal component of the name of the
  1034. XEmacs executable (usually `xemacs'), and `x-emacs-application-class'
  1035. is generally `Emacs'.
  1036.  
  1037. 
  1038. File: xemacs.info,  Node: Menubar Resources,  Prev: Widgets,  Up: X Resources
  1039.  
  1040. Menubar Resources
  1041. -----------------
  1042.  
  1043.    As the menubar is implemented as a widget which is not a part of
  1044. XEacs proper, it does not use the fac" mechanism for specifying fonts
  1045. and colors: It uses whatever resources are appropriate to the type of
  1046. widget which is used to implement it.
  1047.  
  1048.    If Emacs was compiled to use only the Motif-lookalike menu widgets,
  1049. then one way to specify the font of the menubar would be
  1050.  
  1051.      Emacs*menubar*font: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
  1052.  
  1053.    If the Motif library is being used, then one would have to use
  1054.  
  1055.      Emacs*menubar*fontList: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
  1056.  
  1057.    because the Motif library uses the `fontList' resource name instead
  1058. of `font', which has subtly different semantics.
  1059.  
  1060.    The same is true of the scrollbars: They accept whichever resources
  1061. are appropriate for the toolkit in use.
  1062.  
  1063. 
  1064. File: xemacs.info,  Node: Quitting,  Next: Lossage,  Prev: Customization,  Up: Top
  1065.  
  1066. Quitting and Aborting
  1067. =====================
  1068.  
  1069. `C-g'
  1070.      Quit.  Cancel running or partially typed command.
  1071.  
  1072. `C-]'
  1073.      Abort innermost recursive editing level and cancel the command
  1074.      which invoked it (`abort-recursive-edit').
  1075.  
  1076. `M-x top-level'
  1077.      Abort all recursive editing levels that are currently executing.
  1078.  
  1079. `C-x u'
  1080.      Cancel an already-executed command, usually (`undo').
  1081.  
  1082.    There are two ways of cancelling commands which are not finished
  1083. executing: "quitting" with `C-g', and "aborting" with `C-]' or `M-x
  1084. top-level'.  Quitting is cancelling a partially typed command or one
  1085. which is already running.  Aborting is getting out of a recursive
  1086. editing level and cancelling the command that invoked the recursive
  1087. edit.
  1088.  
  1089.    Quitting with `C-g' is used for getting rid of a partially typed
  1090. command or a numeric argument that you don't want.  It also stops a
  1091. running command in the middle in a relatively safe way, so you can use
  1092. it if you accidentally start executing a command that takes a long
  1093. time.  In particular, it is safe to quit out of killing; either your
  1094. text will ALL still be there, or it will ALL be in the kill ring (or
  1095. maybe both).  Quitting an incremental search does special things
  1096. documented under searching; in general, it may take two successive
  1097. `C-g' characters to get out of a search.  `C-g' works by setting the
  1098. variable `quit-flag' to `t' the instant `C-g' is typed; Emacs Lisp
  1099. checks this variable frequently and quits if it is non-`nil'.  `C-g' is
  1100. only actually executed as a command if it is typed while Emacs is
  1101. waiting for input.
  1102.  
  1103.    If you quit twice in a row before the first `C-g' is recognized, you
  1104. activate the "emergency escape" feature and return to the shell.  *Note
  1105. Emergency Escape::.
  1106.  
  1107.    You can use `C-]' (`abort-recursive-edit') to get out of a recursive
  1108. editing level and cancel the command which invoked it.  Quitting with
  1109. `C-g' does not do this, and could not do this because it is used to
  1110. cancel a partially typed command within the recursive editing level.
  1111. Both operations are useful.  For example, if you are in the Emacs
  1112. debugger (*note Lisp Debug::.) and have typed `C-u 8' to enter a
  1113. numeric argument, you can cancel that argument with `C-g' and remain in
  1114. the debugger.
  1115.  
  1116.    The command `M-x top-level' is equivalent to "enough" `C-]' commands
  1117. to get you out of all the levels of recursive edits that you are in.
  1118. `C-]' only gets you out one level at a time, but `M-x top-level' goes
  1119. out all levels at once.  Both `C-]' and `M-x top-level' are like all
  1120. other commands and unlike `C-g' in that they are effective only when
  1121. Emacs is ready for a command.  `C-]' is an ordinary key and has its
  1122. meaning only because of its binding in the keymap.  *Note Recursive
  1123. Edit::.
  1124.  
  1125.    `C-x u' (`undo') is not strictly speaking a way of cancelling a
  1126. command, but you can think of it as cancelling a command already
  1127. finished executing.  *Note Undo::.
  1128.  
  1129. 
  1130. File: xemacs.info,  Node: Lossage,  Next: Bugs,  Prev: Quitting,  Up: Top
  1131.  
  1132. Dealing With Emacs Trouble
  1133. ==========================
  1134.  
  1135.    This section describes various conditions in which Emacs fails to
  1136. work, and how to recognize them and correct them.
  1137.  
  1138. * Menu:
  1139.  
  1140. * Stuck Recursive::    `[...]' in mode line around the parentheses.
  1141. * Screen Garbled::     Garbage on the screen.
  1142. * Text Garbled::       Garbage in the text.
  1143. * Unasked-for Search:: Spontaneous entry to incremental search.
  1144. * Emergency Escape::   Emergency escape--
  1145.                         What to do if Emacs stops responding.
  1146. * Total Frustration::  When you are at your wits' end.
  1147.  
  1148. 
  1149. File: xemacs.info,  Node: Stuck Recursive,  Next: Screen Garbled,  Prev: Lossage,  Up: Lossage
  1150.  
  1151. Recursive Editing Levels
  1152. ------------------------
  1153.  
  1154.    Recursive editing levels are important and useful features of Emacs,
  1155. but they can seem like malfunctions to the user who does not understand
  1156. them.
  1157.  
  1158.    If the mode line has square brackets `[...]' around the parentheses
  1159. that contain the names of the major and minor modes, you have entered a
  1160. recursive editing level.  If you did not do this on purpose, or if you
  1161. don't understand what that means, you should just get out of the
  1162. recursive editing level.  To do so, type `M-x top-level'.  This is
  1163. called getting back to top level.  *Note Recursive Edit::.
  1164.  
  1165. 
  1166. File: xemacs.info,  Node: Screen Garbled,  Next: Text Garbled,  Prev: Stuck Recursive,  Up: Lossage
  1167.  
  1168. Garbage on the Screen
  1169. ---------------------
  1170.  
  1171.    If the data on the screen looks wrong, the first thing to do is see
  1172. whether the text is actually wrong.  Type `C-l', to redisplay the
  1173. entire screen.  If the text appears correct after this, the problem was
  1174. entirely in the previous screen update.
  1175.  
  1176.    Display updating problems often result from an incorrect termcap
  1177. entry for the terminal you are using.  The file `etc/TERMS' in the Emacs
  1178. distribution gives the fixes for known problems of this sort.
  1179. `INSTALL' contains general advice for these problems in one of its
  1180. sections.  Very likely there is simply insufficient padding for certain
  1181. display operations.  To investigate the possibility that you have this
  1182. sort of problem, try Emacs on another terminal made by a different
  1183. manufacturer.  If problems happen frequently on one kind of terminal but
  1184. not another kind, the real problem is likely to be a bad termcap entry,
  1185. though it could also be due to a bug in Emacs that appears for terminals
  1186. that have or lack specific features.
  1187.  
  1188. 
  1189. File: xemacs.info,  Node: Text Garbled,  Next: Unasked-for Search,  Prev: Screen Garbled,  Up: Lossage
  1190.  
  1191. Garbage in the Text
  1192. -------------------
  1193.  
  1194.    If `C-l' shows that the text is wrong, try undoing the changes to it
  1195. using `C-x u' until it gets back to a state you consider correct.  Also
  1196. try `C-h l' to find out what command you typed to produce the observed
  1197. results.
  1198.  
  1199.    If a large portion of text appears to be missing at the beginning or
  1200. end of the buffer, check for the word `Narrow' in the mode line.  If it
  1201. appears, the text is still present, but marked off-limits.  To make it
  1202. visible again, type `C-x n w'.  *Note Narrowing::.
  1203.  
  1204. 
  1205. File: xemacs.info,  Node: Unasked-for Search,  Next: Emergency Escape,  Prev: Text Garbled,  Up: Lossage
  1206.  
  1207. Spontaneous Entry to Incremental Search
  1208. ---------------------------------------
  1209.  
  1210.    If Emacs spontaneously displays `I-search:' at the bottom of the
  1211. screen, it means that the terminal is sending `C-s' and `C-q' according
  1212. to the poorly designed xon/xoff "flow control" protocol.  You should
  1213. try to prevent this by putting the terminal in a mode where it will not
  1214. use flow control, or by giving it enough padding that it will never
  1215. send a `C-s'.  If that cannot be done, you must tell Emacs to expect
  1216. flow control to be used, until you can get a properly designed terminal.
  1217.  
  1218.    Information on how to do these things can be found in the file
  1219. `INSTALL' in the Emacs distribution.
  1220.  
  1221. 
  1222. File: xemacs.info,  Node: Emergency Escape,  Next: Total Frustration,  Prev: Unasked-for Search,  Up: Lossage
  1223.  
  1224. Emergency Escape
  1225. ----------------
  1226.  
  1227.    Because at times there have been bugs causing Emacs to loop without
  1228. checking `quit-flag', a special feature causes Emacs to be suspended
  1229. immediately if you type a second `C-g' while the flag is already set,
  1230. so you can always get out of XEmacs.  Normally Emacs recognizes and
  1231. clears `quit-flag' (and quits!) quickly enough to prevent this from
  1232. happening.
  1233.  
  1234.    When you resume Emacs after a suspension caused by multiple `C-g', it
  1235. asks two questions before going back to what it had been doing:
  1236.  
  1237.      Auto-save? (y or n)
  1238.      Abort (and dump core)? (y or n)
  1239.  
  1240. Answer each one with `y' or `n' followed by <RET>.
  1241.  
  1242.    Saying `y' to `Auto-save?' causes immediate auto-saving of all
  1243. modified buffers in which auto-saving is enabled.
  1244.  
  1245.    Saying `y' to `Abort (and dump core)?' causes an illegal instruction
  1246. to be executed, dumping core.  This is to enable a wizard to figure out
  1247. why Emacs was failing to quit in the first place.  Execution does not
  1248. continue after a core dump.  If you answer `n', execution does
  1249. continue.  With luck, Emacs will ultimately check `quit-flag' and quit
  1250. normally.  If not, and you type another `C-g', it is suspended again.
  1251.  
  1252.    If Emacs is not really hung, but is just being slow, you may invoke
  1253. the double `C-g' feature without really meaning to.  In that case,
  1254. simply resume and answer `n' to both questions, and you will arrive at
  1255. your former state.  Presumably the quit you requested will happen soon.
  1256.  
  1257.    The double-`C-g' feature may be turned off when Emacs is running
  1258. under a window system, since the window system always enables you to
  1259. kill Emacs or to create another window and run another program.
  1260.  
  1261. 
  1262. File: xemacs.info,  Node: Total Frustration,  Prev: Emergency Escape,  Up: Lossage
  1263.  
  1264. Help for Total Frustration
  1265. --------------------------
  1266.  
  1267.    If using Emacs (or something else) becomes terribly frustrating and
  1268. none of the techniques described above solve the problem, Emacs can
  1269. still help you.
  1270.  
  1271.    First, if the Emacs you are using is not responding to commands, type
  1272. `C-g C-g' to get out of it and then start a new one.
  1273.  
  1274.    Second, type `M-x doctor <RET>'.
  1275.  
  1276.    The doctor will make you feel better.  Each time you say something to
  1277. the doctor, you must end it by typing <RET> <RET>.  This lets the
  1278. doctor know you are finished.
  1279.  
  1280.